#!/bin/sh
read -p "input path:" FilePath
getAllfiles(){
for file in $(ls $FilePath)
do
	if [ -f $file ];then
		echo $file
		mv $file /home/zhangk/test
	elif test -d $file ;then
		echo "-------------------------------->"
		cd $file
		FilePath=$(pwd)
		getAllfiles
		cd ..
		echo -e "\033[32m[############$file is a directory ....#######]\033[0m"
		echo "<-------------------------------"
	else
		echo "$FilePath is a invalid path"
	fi
done
}
cd $FilePath
getAllfiles $FilePath
